<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
</head>
<body>
    <!-- 侧边导航栏片段 -->
    <div th:fragment="sidebar">
        <nav id="sidebar" class="col-md-3 col-lg-2 d-md-block bg-dark sidebar collapse">
            <div class="position-sticky pt-3">
                <!-- 系统标题 -->
                <div class="sidebar-header text-center mb-4">
                    <a class="navbar-brand text-white" th:href="@{/dashboard}">
                        <i class="bi bi-search"></i> 校园失物招领系统
                    </a>
                </div>
                
                <!-- 主菜单 -->
                <ul class="nav flex-column">
                    <li class="nav-item">
                        <a class="nav-link text-white" th:href="@{/dashboard}">
                            <i class="bi bi-speedometer2"></i>
                            仪表盘
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-white" th:href="@{/lost-item/list}">
                            <i class="bi bi-bag-plus"></i>
                            失物招领管理
                        </a>
                    </li>
                    <li class="nav-item">
                        <a class="nav-link text-white" th:href="@{/claim-record/list}">
                            <i class="bi bi-check-circle"></i>
                            认领记录管理
                        </a>
                    </li>
                </ul>

                <!-- 统计分析菜单 -->
                <h6 class="sidebar-heading d-flex justify-content-between align-items-center px-3 mt-4 mb-1 text-muted">
                    <span>统计分析</span>
                </h6>
                <ul class="nav flex-column mb-2">
                    <li class="nav-item">
                        <a class="nav-link text-white" th:href="@{/stats/dashboard}">
                            <i class="bi bi-bar-chart"></i>
                            数据统计
                        </a>
                    </li>
                </ul>

                <!-- 用户菜单 -->
                <div class="sidebar-footer mt-auto p-3 border-top border-secondary">
                    <div class="dropdown">
                        <a class="nav-link dropdown-toggle text-white" href="#" id="userDropdown" role="button" data-bs-toggle="dropdown">
                            <i class="bi bi-person-circle"></i> 管理员
                        </a>
                        <ul class="dropdown-menu dropdown-menu-dark">
                            <li><a class="dropdown-item" th:href="@{/logout}">
                                <i class="bi bi-box-arrow-right"></i> 退出登录
                            </a></li>
                        </ul>
                    </div>
                </div>
            </div>
        </nav>
    </div>
</body>
</html>